package com.recharge.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.entity.Customer;
import com.entity.Recharge;
import com.rechaege.service.RechargeService;
import com.utils.JsonResult;

/**   
* @Title: RechargeController.java 
* @Package com.recharge.controller 
* @author 孙梦楠 
* @date 2017年11月7日 下午1:07:06 
* @version V1.0.0   
*/

@RestController
@RequestMapping(value = "/recharge")
public class RechargeController {

	@Autowired
	private RechargeService rechargeservice;

	// 充值
	@RequestMapping(value = "/recharge", method = RequestMethod.POST)
	public JsonResult<Recharge> recharge(@RequestBody Recharge recharge) {

		Integer customerid = recharge.getCustomerid();
		Double money = recharge.getMoney();

		return rechargeservice.recharge(customerid, money);

	}


}
